<script setup lang="ts">
import { onMounted } from 'vue';
import { RouterView } from 'vue-router'
import request from './api/request';
import { userSchoolLeaderStore } from './stores';
//import loading from './components/loading.vue';

const leaderStore = userSchoolLeaderStore();

 onMounted(()=>{
  //初始化校领导字典表
  request.get<string[]>('/query/getSchoolLeaders')
  .then((resp)=>{
    const leaders = resp.data;
    if(leaders)leaderStore.setLeaders(leaders);
  })

 });

</script>

<template>

  <!-- 开启顶部安全区适配 -->
<!-- <van-nav-bar safe-area-inset-top />-->

<!-- 开启底部安全区适配 -->
<!-- <van-number-keyboard safe-area-inset-bottom />-->
    
<router-view v-slot="{ Component }">
  <keep-alive>
    <component :is="Component" />
  </keep-alive>
</router-view>

</template>

<style scoped>


</style>
